using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSRI.HelperClasses;
using Instedd.Labs.Geo.Library.Kml;
using Mvp.Xml.Common.Xsl;
using System.Xml;
using System.IO;
using System.Xml.Xsl;
using System.Collections.Specialized;
using Instedd.Labs.Geo.Library.Sms;

namespace Instedd.Labs.Geo.Library.Tests.Managers
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class PathResolverFixture
    {
        public PathResolverFixture()
        {
        }

        [TestMethod]
        public void RelativePathsResolvesAbsoluteBasePath()
        {
            string path = PathResolver.TryToResolveUsingBaseDirectory("path.txt");

            Assert.AreEqual(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "path.txt"), path);
        }

        [TestMethod]
        public void ResolveBasePathReturnsTheSamePathIfThePathIsRooted()
        {
            string path = PathResolver.TryToResolveUsingBaseDirectory(@"c:\path.txt");

            Assert.AreEqual(@"c:\path.txt", path);
        }

        [TestMethod]
        public void ResolveDataPathReturnsTheSamePathIfThePathIsRooted()
        {
            string path = PathResolver.TryToResolveUsingDataDirectory(@"c:\path.txt");

            Assert.AreEqual(@"c:\path.txt", path);
        }
    }
}